/summon villager ~ ~2 ~ {VillagerData:{profession:librarian,level:5,type:plains},Offers:{Recipes:[
{buy:{id:diamond,Count:4}
,sell:{id:music_disc_mellohi,Count:1,tag:
{display:{Name:"{\"text\":\"Diamond Talisman Level 1\",\"color\":\"blue\"}"},AttributeModifiers:
[{AttributeName:"generic.attackDamage",Name:"generic.attackDamage",Amount:1,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:0.2,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.armorToughness",Name:"generic.armorToughness",Amount:2,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]},maxUses:9999999}},

{buy:{id:music_disc_mellohi,Count:1,tag:
{display:{Name:"{\"text\":\"Diamond Talisman Level 1\",\"color\":\"blue\"}"},AttributeModifiers:
[{AttributeName:"generic.attackDamage",Name:"generic.attackDamage",Amount:1,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:0.2,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.armorToughness",Name:"generic.armorToughness",Amount:2,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]}}
,buyB:{id:diamond,Count:2,tag:
{display:{Name:"{\"text\":\"Diamond Upgrade\",\"color\":\"blue\"}"}}}
,sell:{id:music_disc_mellohi,Count:1,tag:
{display:{Name:"{\"text\":\"Diamond Talisman Level 2\",\"color\":\"blue\"}"},AttributeModifiers:
[{AttributeName:"generic.attackDamage",Name:"generic.attackDamage",Amount:2,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:0.4,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.armorToughness",Name:"generic.armorToughness",Amount:4,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]}},maxUses:9999999},

{buy:{id:music_disc_mellohi,Count:1,tag:
{display:{Name:"{\"text\":\"Diamond Talisman Level 2\",\"color\":\"blue\"}"},AttributeModifiers:
[{AttributeName:"generic.attackDamage",Name:"generic.attackDamage",Amount:2,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:0.4,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.armorToughness",Name:"generic.armorToughness",Amount:4,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]}}
,buyB:{id:diamond,Count:4,tag:
{display:{Name:"{\"text\":\"Diamond Upgrade\",\"color\":\"blue\"}"}}}
,sell:{id:music_disc_mellohi,Count:1,tag:
{display:{Name:"{\"text\":\"Diamond Talisman Level 3\",\"color\":\"blue\"}"},AttributeModifiers:
[{AttributeName:"generic.attackDamage",Name:"generic.attackDamage",Amount:3,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:0.6,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.armorToughness",Name:"generic.armorToughness",Amount:6,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]}},maxUses:9999999},

{buy:{id:music_disc_mellohi,Count:1,tag:
{display:{Name:"{\"text\":\"Diamond Talisman Level 3\",\"color\":\"blue\"}"},AttributeModifiers:
[{AttributeName:"generic.attackDamage",Name:"generic.attackDamage",Amount:3,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:0.6,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.armorToughness",Name:"generic.armorToughness",Amount:6,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]}}
,buyB:{id:diamond,Count:8,tag:
{display:{Name:"{\"text\":\"Diamond Upgrade\",\"color\":\"blue\"}"}}}
,sell:{id:music_disc_mellohi,Count:1,tag:
{display:{Name:"{\"text\":\"Diamond Talisman Level 4\",\"color\":\"blue\"}"},AttributeModifiers:
[{AttributeName:"generic.attackDamage",Name:"generic.attackDamage",Amount:4,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:0.8,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.armorToughness",Name:"generic.armorToughness",Amount:8,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]}},maxUses:9999999},

{buy:{id:music_disc_mellohi,Count:1,tag:
{display:{Name:"{\"text\":\"Diamond Talisman Level 4\",\"color\":\"blue\"}"},AttributeModifiers:
[{AttributeName:"generic.attackDamage",Name:"generic.attackDamage",Amount:4,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:0.8,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.armorToughness",Name:"generic.armorToughness",Amount:8,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]}}
,buyB:{id:diamond,Count:16,tag:
{display:{Name:"{\"text\":\"Diamond Upgrade\",\"color\":\"blue\"}"}}}
,sell:{id:music_disc_mellohi,Count:1,tag:
{display:{Name:"{\"text\":\"Diamond Talisman Level 5\",\"color\":\"blue\"}"},AttributeModifiers:
[{AttributeName:"generic.attackDamage",Name:"generic.attackDamage",Amount:6,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:1,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.armorToughness",Name:"generic.armorToughness",Amount:10,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]}},maxUses:9999999}]}}